﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;

namespace Notepad_X.Components
{
    public class ToolBarLabelX : System.Windows.Forms.ToolStripLabel
    {
        public string IconKey;
        public string StringKey;

        private Notepad_X.Classes.Icons oIcon;
        private Notepad_X.Classes.Strings oString;

        [DefaultValue(Notepad_X.Classes.Icons.none)]
        public Notepad_X.Classes.Icons Icon
        {
            get { return oIcon; }
            set { oIcon = value; Invalidate(); }
        }

        [DefaultValue(Notepad_X.Classes.Strings.none)]
        public Notepad_X.Classes.Strings String
        {
            get { return oString; }
            set { oString = value; Invalidate(); }
        }


        public ToolBarLabelX()
        {
            IconKey = null;
            StringKey = null;
        }
        public void set(String _StringKey, String _ImageKey)
        {
            IconKey = _ImageKey;
            StringKey = _StringKey;
        }
        public void set(String _StringKey, Notepad_X.Classes.Icons _Icon)
        {
            StringKey = _StringKey;
            Icon = _Icon;
            IconKey = Enum.GetName(typeof(Notepad_X.Classes.Icons), _Icon);
        }
        public void set(Notepad_X.Classes.Strings _String, Notepad_X.Classes.Icons _Icon)
        {
            String = _String;
            StringKey = Enum.GetName(typeof(Notepad_X.Classes.Strings), _String); ;
            Icon = _Icon;
            IconKey = Enum.GetName(typeof(Notepad_X.Classes.Icons), _Icon);
        }
        public void set(String _StringKey)
        {
            StringKey = _StringKey;
        }
        public void set(Notepad_X.Classes.Icons _Icon)
        {
            Icon = _Icon;
            IconKey = Enum.GetName(typeof(Notepad_X.Classes.Icons), _Icon);
        }
    }
}